package com.tongann.wind.mapper;

import com.tongann.wind.model.Organization;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

@Repository
@Mapper
public interface OrganizationMapper {

    @Select("SELECT * FROM ta_organization where name LIKE '%${value}%'   OR mark LIKE '%${value}%'  ")
    Organization selectOrgByName(String name);

    @Insert("insert into ta_organization (uuid,name,higher,highterId,createTime,adminId,longitude,latitude, mark)" +
            " values(#{uuid},#{name},#{higher},#{highterId},#{createTime},#{adminId},#{longitude},#{latitude},#{mark}) ")
    Boolean insertOrg(Organization organization);

}
